home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Graphics Plus
/
Graphics Plus.iso
/
msdos
/
fractal
/
forb01
/
fractorb.doc
< prev
next >
Wrap
Text File
|
1991-07-25
|
6KB
|
105 lines
FractOrb
program to display orbits of points in and near the Mandelbrot set
copyright 1991 by Steven C. Willett
June 29, 1991
This program displays the orbits of points on the complex plane as
the Mandelbrot mapping (x' = x² + c) is repeatedly applied to them.
Recall that the Mandelbrot set consists of all the points on the complex
plane which generate a bounded sequence under the iteration of this
mapping. Recall also that it has been shown that a sequence will not be
bounded if the magnitude of any member of the sequence exceeds 2, so only
points near the origin are of much interest.
This program is written for Turbo C and uses the Borland Graphics
Interface drivers. It runs on both EGA and VGA systems. It will run on
CGA systems as well, but the data displays are somewhat too large for the
CGA format, so they will not quite fit properly on screen. Since the CGA
quality is so poor I have not bothered to fix this up. The standard version
of FractOrb has the graphics drivers linked into the executable code so it
can be run on any compatible machine. The SFORB version supports the SVGA
driver written by Jordan Hargrave. In this case the file SVGA16.BGI must be
available in the current directory when the program is run. This file is
included with the permission of the author. I have also included SVGA16.TXT,
a brief description of Jordan's SVGA driver, and SVGA16.REG, a form for
registering Jordan's SVGA drivers. Registration is not required to use his
driver, but is encouraged for those who might be interested in developing
applications using it.
When started this program displays a very crude sketch of the
outline of the Mandelbrot set and the real and imaginary axes, with a cross
marking the initial starting point at the origin. The coordinates of the
starting point are (always) displayed on the bottom line to the left. At
the top of the screen is a title line and a line showing what command
keystrokes are available.
The starting point can be moved in small steps (the step size is
initially 1/512, and is displayed on the bottom line with the coordinates)
using the arrow keys. It can be moved in large steps (32 times the small
step) using PgUp, PgDn, Home (to the left) and End (to the right). The
small step size can be halved with the '/' and doubled with the '*'.
The program has two different operation modes, Auto and Manual. The
'A' and 'M' keys are both toggles to change operational mode between these
two (I am very fond of toggles :->), so they behave identically. The
program starts up in Manual mode. In this mode the orbit is displayed one
iteration at a time with each non-command keystroke (space bar is
convenient). Of course you will have to move the starting point away from
the origin to see anything interesting - the origin is a fixed point under
the Mandelbrot mapping. If you toggle to Auto the orbit is shown
continuously and resets itself anytime you move the starting point (or hit
'R' for reset). This is usually the most spectacular show, but Manual is
very nice to slow things down when you find an interesting orbit and you
want to take a closer look. You can pause the display in Auto by hitting
any non-command key. FractOrb will beep at you to remind you that you have
to hit a key (any key) to continue.
The program also has two display modes, Points and Lines. As you
might expect, the 'P' and 'L' keys are both toggles to change display mode.
The default is Lines - in this mode the program displays the last 16
iterations as lines drawn between successive points in different colors
(white is the most recent). In Point display mode the program displays all
the points which are visited in the orbit. The two modes "feel" very
different, both are interesting. The Lines mode gives you a better flavor
of what the orbit looks like over time, since older points disappear. The
Points mode, on the other hand, displays the true complexity of the overall
orbit more effectively. It is also much faster - the Lines mode has to
redraw 16 lines for each iteration while the Points mode just places one
new pixel on the screen.
Finally FractOrb beeps twice to tell you when the orbit goes off
screen and then stops. The response to the next keystroke depends on
operational and display modes: if you are in Auto mode OR in Points mode
the next keystroke acts like a reset. In Manual mode and Lines mode you
can continue to follow the orbit while the old lines go off screen by
hitting non-command keys.
This is my first attempt to distribute something I have written to
the MSDOS community - my old efforts in the CPM world have now become
ancient history! I was moved to do so by my appreciation of many
pieces of software I have gotten from others who have done this before.
The program came about as a result of my efforts to explain to puzzled non-
mathematical, non-computerized friends just what the hell the Mandelbrot
set IS! {;-)} I was inspired by the Stone Soup folks who have developed
an amazing piece of software in FRACTINT (which helped me decide not to
bother distributing my own not-particularly-distinguished Mandelbrot/Julia
set generator) but their orbit feature was far too "low key" to help my
explanations. If any of you are out there I would be interested in trying
to incorporate this scheme in the FRACTINT package.
This program is copyrighted, but is freely distributed with the
usual proviso that it not be used for any commercial purpose without my
permission and that it be distributed in its entirety - i.e, including this
document. At this point I am not including the source - primarily because
I would be embarrassed to have the world know how slovenly I am. This
program was originally written in one 16 hour session and it shows!
I would love to hear from anyone about this software.
Steve Willett
6422 Irwin Ct.
Oakland, CA 94609
(415) 654-7818 (h) - {area code changes to 510 in fall 1991}
(415) 643-9544 (w - UC Berkeley, Chem. Eng.) { " }
Prodigy: HXHW27A
Internet: swillett@cchem.berkeley.edu